package wang.sam.com.objectboxdemo

import android.app.Application
import android.util.Log
import io.objectbox.BoxStore
import wang.sam.com.objectboxdemo.proguard.EmptyEntity
import wang.sam.com.objectboxdemo.proguard.MyObjectBox
import wang.sam.com.objectboxdemo.proguard.TestEntityWithoutAnnotation

class App : Application() {
    lateinit var boxStore: BoxStore

    override fun onCreate() {
        super.onCreate()
        boxStore = MyObjectBox.builder().androidContext(this).build()

        val box = boxStore.boxFor(EmptyEntity::class.java)//box
//        or
//        val box2: Box<EmptyEntity> = boxStore.boxFor()
        val test = TestEntityWithoutAnnotation(0, "aaaa")
        Log.e(test.name, test.id.toString())




    }



}